Skip to content

Radxa E52C: add mainline U-Boot support and kernel target configuration#9366

Merged
Grippy98 merged 2 commits intoarmbian:mainfrom
okrc:radxa-e52c
Feb 7, 2026
Merged

Radxa E52C: add mainline U-Boot support and kernel target configuration#9366
Grippy98 merged 2 commits intoarmbian:mainfrom
okrc:radxa-e52c

Conversation

@okrc
Copy link
Member

@okrc okrc commented Feb 6, 2026

Summary by CodeRabbit

  • New Features

    • Added Radxa E52C support (RK3582) with U-Boot and kernel integration, including automatic hardware-aware device-tree adjustments for improved compatibility.
    • Expanded kernel target options and set default console to serial.
    • Enabled additional filesystem support (Btrfs) for relevant boot targets.
  • Documentation

    • Updated Rockchip boards docs to list Radxa E52C as supported.

Testing by schwar3kat

  • Build completed successfully
  • Tested on real hardware radxa-e52c
  • Current - Trixie minimal, Noble minimal
  • Edge - Trixie minimal, Noble minimal
  • Vendor - Trixie minimal, Noble minimal
  • Boot, reboot, shutdown verified
  • Network both ports

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

Adds Radxa E52C board support and RK3582 enablement: board config updates including mainline U-Boot helpers, U-Boot RK3582 OTP-driven device-tree fixups, generic RK3588 config changes, and new Radxa E52C device-tree and defconfig files. (49 words)

Changes

Cohort / File(s) Summary
Board Configuration
config/boards/radxa-e52c.conf
Updated KERNEL_TARGET to "vendor,current,edge", added DEFAULT_CONSOLE="serial", and added two post-config functions to enable mainline U-Boot behavior and extra U-Boot configs (BTRFS); minor whitespace edits.
U-Boot: RK3582 system setup
patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch
Introduces ft_system_setup(void *blob, struct bd_info *bd) and helpers to read OTP (CPU code, ip-state), apply fail/disable masks, mutate the FDT (remove/rename cpu-map clusters, fail GPU/codec/iommu nodes), and append RK3582-compatible strings.
U-Boot: Generic RK3588 updates
patch/u-boot/v2026.01/board_radxa-e52c/0001-rk3588-generic-support-for-rk3582.patch
Enables OF_SYSTEM_SETUP/CONFIG_OF_SYSTEM_SETUP, updates rk3588-generic.dts model string to include RK3582, and updates docs/defconfig to reflect RK3582 support.
Radxa E52C board support files
patch/u-boot/v2026.01/board_radxa-e52c/1000-add-support-for-radxa-e52c.patch
Adds arch/arm/dts/rk3582-radxa-e52c-u-boot.dtsi, configs/radxa-e52c-rk3582_defconfig, and updates Rockchip board documentation to list Radxa E52C.

Sequence Diagram

sequenceDiagram
    participant UBoot as U-Boot
    participant OTP as OTP Hardware
    participant FDT as Device Tree
    UBoot->>OTP: read CPU code (OTP offset)
    OTP-->>UBoot: CPU code
    alt CPU code == RK3582
        UBoot->>OTP: read ip-state bitmask
        OTP-->>UBoot: ip-state bits
        UBoot->>UBoot: compute FAIL_* masks & policies
        alt cluster(s) disabled
            UBoot->>FDT: remove/rename cpu-map clusters
        end
        alt GPU/codec disabled
            UBoot->>FDT: mark gpu@, video-codec@, iommu@ nodes failed/disabled
        end
        UBoot->>FDT: append "rk3582" to root compatible/soc strings
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through trees of DT,
Read OTP secrets silently,
Fixed clusters, flagged the rest,
Radxa E52C springs to test,
Mainline U-Boot — what a spree! 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding mainline U-Boot support and kernel target configuration for Radxa E52C, which align with the substantial modifications across config, U-Boot patches, and device tree files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/large PR with 250 lines or more 02 Milestone: First quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Feb 6, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
config/boards/radxa-e52c.conf (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Board description says "octa core" but RK3582 is a 6-core SoC.

The RK3582 has 2× Cortex-A76 + 4× Cortex-A55 = 6 cores (confirmed by the patch commit message at line 10 of 1000-add-support-for-radxa-e52c.patch and the OTP/policy output showing 2 CPU cores failed from the RK3588's 8). Also, "SoC" appears twice in the description.

Proposed fix
-# Rockchip RK3582 SoC octa core 4-16GB SoC eMMC USB3
+# Rockchip RK3582 hexa core 4-16GB SoC eMMC USB3
🧹 Nitpick comments (1)
patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch (1)

161-176: cluster1_removed is set unconditionally — fine in practice, but fragile if the DT structure were ever unexpected.

On line 165, cluster1_removed = true executes regardless of whether fdt_path_del_node succeeded. If the cluster1 node were absent from the DT, this would still trigger the cluster2 → cluster1 rename at line 175, which would also silently fail. Functionally harmless since the RK3588 DT is expected to always have cluster0/1/2, but a guard could prevent a misleading rename attempt.

This is a very minor robustness nit on an upstream-authored patch, so no change is necessary.

Optional: guard `cluster1_removed` on success
 	if ((ip_state[0] & FAIL_CPU_CLUSTER1) == FAIL_CPU_CLUSTER1) {
 		log_debug("remove cpu-map cluster1\n");
-		fdt_path_del_node(blob, "/cpus/cpu-map/cluster1");
-		cluster1_removed = true;
+		if (!fdt_path_del_node(blob, "/cpus/cpu-map/cluster1"))
+			cluster1_removed = true;
 	}

@schwar3kat
Copy link
Contributor

schwar3kat commented Feb 6, 2026

I will build images and test this on radxa-e52c board.
Done.

@rpardini
Copy link
Member

rpardini commented Feb 6, 2026

Nice. Maybe you could run ./compile.sh BOARD=radxa-e52c BRANCH=edge rewrite-uboot-patches and commit, so we avoid churn down the line. Although I suspect those will land in 24.04 so quite optional

Copy link
Contributor

@schwar3kat schwar3kat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested okay on the board.

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Feb 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Feb 7, 2026
Signed-off-by: okrc <okrc@hexo.dev>
@github-actions github-actions bot added Ready to merge Reviewed, tested and ready for merge Needs review Seeking for review and removed Ready to merge Reviewed, tested and ready for merge labels Feb 7, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch`:
- Around line 231-259: The soc_comp construction and FDT calls can silently
truncate or fail; ensure soc_comp is large enough (or dynamically sized) to hold
any "rockchip,rk35..." variant and check snprintf's return value to detect
truncation (referencing soc_comp and cpu_code usage), and check return values
from fdt_setprop_placeholder and both fdt_appendprop_string calls—on any error
log a descriptive message and return a negative error code so the DT cannot be
left in an inconsistent state; also handle failures from
fdt_stringlist_get/fdt_path_offset similarly (references: fdt_path_offset,
fdt_stringlist_get, snprintf, fdt_setprop_placeholder, fdt_appendprop_string).
- Around line 208-229: The code treats a missing CPU DT node as a hard error and
returns the negative node value from ft_system_setup when fdt_subnode_offset
fails; change this to be tolerant: if fdt_subnode_offset(blob, parent,
cpu_node_names[i]) returns < 0, emit a log_debug (or log_info) indicating the
node is absent and continue the loop instead of returning the error, while
keeping the existing fdt_status_fail(blob, node) path for nodes that do exist
and need failing; reference fdt_path_offset, ip_state, cpu_node_names[],
fdt_subnode_offset and fdt_status_fail to locate and update the logic.

@okrc
Copy link
Member Author

okrc commented Feb 7, 2026

Nice. Maybe you could run ./compile.sh BOARD=radxa-e52c BRANCH=edge rewrite-uboot-patches and commit, so we avoid churn down the line. Although I suspect those will land in 24.04 so quite optional

Done.

@Grippy98 Grippy98 merged commit 09b7895 into armbian:main Feb 7, 2026
12 checks passed
@okrc okrc deleted the radxa-e52c branch February 7, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

4 participants